﻿[System.Serializable]
public struct IntVector2 {

	// X and Y coordinates
	public int x, y;
	public IntVector2(int x, int y) {
		this.x = x;
		this.y = y;
	}

	// Adjust the coordinates by a and b.
	public static IntVector2 operator + (IntVector2 a, IntVector2 b) {
		a.x += b.x;
		a.y += b.y;
		return a;
	}

	// Is this IntVector2 equal to the obj?
	public override bool Equals (object obj) {
		IntVector2 other = (IntVector2)obj;
		return x == other.x && y == other.y;
	}

	// Return the hashcode.
	public override int GetHashCode() {
		return 1;
	}
}
